<?php

namespace app\model;


use think\Model;
use think\model\concern\SoftDelete;

class TaskModel extends Model
{
    protected $name = 'task';
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = 0;

    public function sendImg()
    {
        return $this->hasMany(TaskSendImgModel::class,'task_id');
    }

    public function backImg()
    {
        return $this->hasMany(TaskBackImgModel::class,'task_id');
    }

    public function user()
    {
        return $this->belongsTo(UserModel::class,'user_id');

    }
}